data type Atree = AEMPTY | A Int Atree Btree
data type Btree = BEMPTY | B Int Btree Atree

trans :: Atree -> Atree
trans t = transa(t 0)

transa :: Atree -> Int -> Atree
transa AEMPTY _ = AEMPTY
transa (A _ at bt) b = (A b transa